import request from "@/utils/request";


//获取所有资源名单列表
export const getAllResourceLimitList = (data) => {
    return request({
        method: 'post',
        url: `api/x-interface_limit/select_interfacelimit_pages`,
        data: data
        //简单写法
        // data
    })
}

//根据id查询某个资源名单
export const getByIdLimit = (limitId = 0) => {
    // debugger
    return request({
        method: 'GET',
        url: `api/x-interface_limit/get_one_interfacelimit/${limitId}`
    })
}


//根据id编辑某个资源名单
export const UpdateLimit = (data) => {
    // debugger
    return request({
        method: 'PUT',
        url: 'api/x-interface_limit/update_interfacelimit', data
    })
}


//新增资源名单
export const AddLimit = (data) => {
    // debugger
    return request({
        method: 'post',
        url: 'api/x-interface_limit/add_interfacelimit',
        data: data
    })
}

//移除资源名单
export const RemoveLimit = (limitId = 0) => {
    // debugger
    return request({
        method: 'delete',
        url: `api/x-interface_limit/delete_interfacelimit/${limitId}`
    })
}


//根据角色获取所有资源名单列表
export const getAllRoleResourceLimitLists = (data) => {
    return request({
        method: 'post',
        url: `api/x-interface_limit/select_interfacelimit_select`,
        data: data
        //简单写法
        // data
    })
}
